package com.ujoku.UrlHelper;

import com.ujoku.request.UrlHelperForm;
import com.ujoku.view.domain.UrlHelperView;

/**
 * Created by suggestion on 2015/5/15.
 */
public class UrlHelperSelector {
    public static UrlHelperBase UrlHelperBuilder(UrlHelperForm form){
        if(form.getUrl().startsWith("/activity"))
            return new UrlActivityHelper();
        if(form.getUrl().startsWith("/p"))
            return new UrlGoodsInfoHelper();
        if(form.getUrl().startsWith("/search"))
            return new UrlSearchHelper();
        if(form.getUrl().startsWith("http://"))
            return new UrlLinkOutHelper();
        return null;
    }
}
